<extend name="./app/Tpl/Public/template.html" />
<block name="content_body">
	<div class="pad-lr-10">
		<form name="form_search" id="form_search" action="{:U('index')}" method="post">
		    <table width="100%" cellspacing="0" class="search-form">
		        <tbody>
		            <tr>
			            <td>
				            <div class="explain-col">
				            	
				            	<select name="shop_id" style="width:255px;" class="chosen_search">
									<option value="">全部店铺</option>
	                				<volist name="shopList" id="val">
								    	<option value="{$val.id}"  <if condition="$val['id'] eq $search['shop_id']">selected</if>>{$val.title}</option>
	                				</volist>
								</select>
								<select name="role_name" style="width:155px;" class="chosen_search">
									<option value="">全部职务</option>
	                				<volist name="roleList" id="val">
								    	<option value="{$val.name}"  <if condition="$val['name'] eq $search['role_name']">selected</if>>{$val.title}</option>
	                				</volist>
								</select>
								<input type="text" name="name" value="{$search.name}" placeholder="员工名称">
								<input type="text" name="mobile" value="{$search.mobile}" placeholder="手机号">
								<input type="button"  name="form_search_btn_search"  value="查询" onclick="document.forms['form_search'].submit()"/>
								<input type="button"  name="form_search_btn_add"  value="新增员工" onclick='redirect("{:U('showAdd')}")'/>
				        	</div>
			            </td>
		            </tr>
		        </tbody>
		    </table>
	    </form>
	    <form  name="form_list" id="form_list" action="{:U('index')}" method="post">
		    <div class="table-list">		
			    <table width="100%" cellspacing="0">
			        <thead>
			            <tr>
			            	<th width="50" align="left">姓名</th>       
			                <th width="80" align="left">帐号</th>
			                <th width="50" align="left">性别</th>
			                <th width="100" align="left">手机</th>
			                <th width="50" align="left">角色</th>
			                <th width="200" align="left">负责店铺</th>
			                <th width="80" align="left">审核状态</th>
			      			<th align="left">操作</th>
			            </tr>
			        </thead>
			    	<tbody>
						<volist name="list" id='val'>
				        <tr>
				        	<td align="left">{$val.name}</td>
				            <td align="left">{$val.account}</td>
				            <td align="left">{$val.sex}</td>
				            <td align="left">{$val.mobile}</td>
				            <td align="left">{$roleList|m_k2v=$val['role_name']|m_k2v='title'}</td>
				            <td align="left">{$shopList|m_k2v=$val['shop_id']|m_k2v='title'}</td>
				            <td align="left">{$val.is_valid|m_is_valid}</td>	
				            <td align="left" class="btn">
			            		<a class="link_btn" href="#" onclick="redirect('{:U('showUpd',array('id'=>$val['id']))}')" >编辑</a>
			            		<a class="link_btn" href="#" onclick="redirect('{:U('Shop/ShopManage/showUpd',array('id'=>$val['shop_id']))}')">店铺信息</a>
				            </td>
				        </tr>
				        </volist>
			    	</tbody>
			    </table>
	    	</div>
	    </form>
	</div>
	<div id="dialog_content" title="弹出框"></div>
<script type="text/javascript">

$(function(){
	$( "#dialog_content" ).dialog({
		autoOpen: false,
		width:550,
		height:250
	});
})

</script>
</block>